
var http = require('http');
var url = 'http://www.imooc.com/learn/348';
//  导入一个模块
var cheerio = require('cheerio');

function filterChapters(html){

     var $ = cheerio.load(html);
     var chapters = $('.learnchapter');
}

http.get(url , function(res){

	var html = '';
	res.on('data', function(data){
		html += data;
	});
	res.on('end',function(){


		filterChapters(html);

	});
}).on('error',function(){

	console.log("获取课程数据错误");
});